<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p #id="remove"><span>即将移除</span></p>
    <button>11<span>点击移除</span></button>
    <script>
        var node = document.getElementById("remove");
        var btn = document.getElementsByTagName("button")[0];
        var textNode = btn.getElementsByTagName('span')[0];

        btn.onclick = function(){
            document.body.remove(node);
        }
        console.log(btn.children);
        console.log(btn.childNodes);

        console.log(textNode.parentNode)
        console.log(textNode.parentElement)
    </script>
    
</body>
</html>